<template>
	<view class="page">
		<view class="menu"  @tap="openMemberManage">
			<view class="title">
				<view class="" style="color: #666666;">个人信息</view>
			</view>
			<view class="icon">
				<image src="https://xb-street.oss-cn-shanghai.aliyuncs.com/smallshop/static/shopingCart/qianjin.png" mode="widthFix"></image>
			</view>
			</view>
		<!-- 	<view class="menu" @tap='openAddressList'>
			<view class="title">
			 <view style="color: #666666;" class="">收货地址</view>
						</view>
						<view class="icon">
							<image src="https://xb-street.oss-cn-shanghai.aliyuncs.com/smallshop/static/shopingCart/qianjin.png" mode="widthFix"></image>
						</view>
					</view> -->
			<view class="loginout" @tap='bindLogin'>
				退出登录
			</view>
			
	</view>


</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		
		computed: mapState(['loginState', 'userInfo']),
		data() {
			return {
				current1: 3,
				user: {},
				testdata: {},
				getUserIn: '',
				top: 0,
				fileSizeString: "", // 缓存总数
				appversion:''

			}
		},
		onShow() {

		},
		onLoad() {
			

		},
		methods: {
			...mapMutations(['logout', 'setUserInfo']),
			openMemberManage(){
				uni.navigateTo({
					url:'updataInfo'
				})
			},
			bindLogin() {
				let _this = this
				uni.showModal({ 
					title: '退出登录',
					content: '确认退出当前账号？',
					success: function(res) {
						if (res.confirm) {
							_this.logout()
							uni.switchTab({
								url:'../index/index'
							})
						} else if (res.cancel) {
							uni.showToast({
								title: '已取消',
								duration: 2000,
								icon: "none"
							})
						}
					}
				});

				// this.getUserInfo()
			},




		}
	}
</script>

<style lang="less" scoped>
	.loginout {
		width: 600rpx;
		height: 88rpx;
		background-color: #FF8308 ;
		margin: 0 auto;
		line-height: 88rpx;
		text-align: center;
		color: #fff;
		font-size: 32rpx;
		border-radius: 50rpx;
		margin-top: 100rpx;
	}
	.page {
		// background-color: #F8F8F8;
		height: 100%;
	}

	.menu {
		display: flex;
		width: 92%;
		margin:  0 auto;
		align-items: center;
		justify-content: space-between;
		margin-top: 30rpx;
		.title{
			display: flex;
			align-items: center;
			view{
				margin-left: 10rpx;
				font-size: 28rpx;
			}
		image {
			width: 38rpx;
			height: 38rpx;
		}	
		}
		.icon {
			display: flex;
			align-items: center;
			image {
				width: 15rpx;
			}
		}
	}
</style>
